1. Field of the Invention
The present invention relates to a storage device and, more particularly, to a text memory control unit for use in electronic typewriters or the like.
2. Description of the Prior Art
Recently, typewriters have been electronized and in such electronic typewriters, the operations regarding the keyboard and printer section of mechanical typewriters are electronically controlled, so that various drawbacks in the mechanical typewriters are eliminated and a relatively good sense of key touch is obtained when a key is depressed; furthermore, various kinds of functions are realized.
On the other hand, a memory is used to execute various functions in such an electronic typewriter; however, in association with the recent high integration for producing an LSI of a memory device and the reduction in cost of such a device, a low-cost non-volatile memory having a relatively large capacity can be used without using an external storage device such as a floppy disk and this memory is used to store a character string. In the typewriter equipped with such text memories, to sentences or idioms, words, addresses, etc. which are frequently used, titles each of which is constituted by one character or a plurality of characters corresponding to each of them is given. Due to this, a plurality of texts are registered in the memory equipped in the typewriter on the basis of such titles. On the other hand, the texts registered in the memory can be also accessed and printed out. Therefore, very useful electronic typewriters are provided.
However, the conventional text memory control unit has a drawback such that a lot of memories are needed in the case where the texts are rearranged to change, insert or delete the input characters. For example, if the texts stored in a text memory 1 are segmented as shown in FIG. 1, to execute the insertion or deletion of characters in a text (B) in the text memory 1, the (B) is once transferred into a work memory 2 in a central processing unit (hereinbelow, referred to as an MPU) for performing various controls and then texts (C) and (D) are shifted immediately after a text (A). Subsequently, the text (B) which has been temporarily saved in the work memory 2 is transferred right after the text (D). After these series of processings, the contents of text management sections (hereinbelow, referred to as directories DIR(B), DIR(C) and DIR(D)) in which the addresses and the like of the texts (B), (C) and (D) were stored are updated. As described above, the essential drawback in the conventional apparatus is that a great number of work memories are required. In addition, the processing time also depends on a size of this work memory and there is also a drawback such that the processing time will have become remarkably long when its size is small.
As shown in FIG. 2, each directory, e.g., DIR(B) comprises: a title (ID) consisting of eight bytes; a head address (address information section ADR) consisting of two bytes regarding each text; and a significant character number information section (CNT) consisting of two bytes in which the number of characters of the text was memorized. In addition, the texts (A), (B), (C) and (D) are the texts constituted by the codes (for example, ASCII codes) corresponding to the characters, and a length of each text is variable. If one desires to further add a new text (E) in such a constitution, to add a DIR[E) to the directory, all of the texts (A), (B), (C) and (D) shown in FIG. 3 have to be shifted by twelve bytes. Furthermore, their directories DIR(A) to DIR(D) also have to be updated. The memory mapping of the text memory after updating is shown in FIG. 4. DIR CNT denotes the number of directories.
Thus, the control procedure of the text memory becomes complicated and it takes a long time for processing. This is because the texts (A) to (D) exist behind the directories indicated by DIR(A) to DIR(D); therefore, the conventional text memory has adopted a very inefficient processing method.